import request from '/@/utils/request.ts';

//=============upload

export function uploadBase64(params: object) {
    console.log('====>>uploadBase64')
    return request({
        url: '/s-file/api/file/base64',
        method: 'post',
        data: params,
    });
}

//文件上传 字节流
export function uploads(params: object) {
    console.log('====>>uploads')
    return request({
        url: '/s-file/api/file/uploads',
        method: 'post',
        data: params,
    });
}

export function findCompany(params:object) {
    console.log('====>>'+findCompany)
    return request({
        url: '/s-aio/api/v6/mech_equ/findCompany',
        method: 'get',
        params: params,
    });
}


//================ mech admin

export function findAllMechAdmin(params: object) {
    console.log('====>>findAllMech')
    return request({
        url: '/s-aio/api/v6/mech_admin/findAllMech',
        method: 'post',
        data: params,
    });
}


export function addMechAdmin(params:object) {
    console.log('====>>'+addMechAdmin)
    return request({
        url: '/s-aio/api/v6/mech_admin/addMechAdmin',
        method: 'post',
        data: params,
    });
}
export function updMechAdmin(params:object) {
    console.log('====>>'+updMechAdmin)
    return request({
        url: '/s-aio/api/v6/mech_admin/updMechAdmin',
        method: 'put',
        data: params,
    });
}
export function updatePass(params:object) {
    console.log('====>>'+updMechAdmin)
    return request({
        url: '/s-aio/api/v6/mech_admin/updatePass',
        method: 'put',
        data: params,
    });
}

export function delMechAdmin(params:object) {
    console.log('====>>'+delMechAdmin)
    return request({
        url: '/s-aio/api/v6/mech_admin/delMechAdmin',
        method: 'delete',
        params: params,
    });
}

//================ mech member

export function findAllMechMember(params: object) {
    console.log('====>>findAllMechMember')
    return request({
        url: '/s-aio/api/v6/mech_member/findAllMechMember',
        method: 'post',
        data: params,
    });
}


export function addMechMember(params:object) {
    console.log('====>>'+addMechMember)
    return request({
        url: '/s-aio/api/v6/mech_member/addMechMember',
        method: 'post',
        data: params,
    });
}
export function updMechMember(params:object) {
    console.log('====>>'+updMechMember)
    return request({
        url: '/s-aio/api/v6/mech_member/updMechMember',
        method: 'put',
        data: params,
    });
}
export function delMechMember(params:object) {
    console.log('====>>'+delMechMember)
    return request({
        url: '/s-aio/api/v6/mech_member/delMechMember',
        method: 'delete',
        params: params,
    });
}
